package com.cskaoyan.mapper;

import com.cskaoyan.bean.CskaoyanmallAdmin;
import com.cskaoyan.bean.CskaoyanmallAdminExample;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CskaoyanmallAdminMapper {
    long countByExample(CskaoyanmallAdminExample example);

    int deleteByExample(CskaoyanmallAdminExample example);

    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(CskaoyanmallAdmin record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(CskaoyanmallAdmin record);

    List<CskaoyanmallAdmin> selectByExample(CskaoyanmallAdminExample example);

    List<CskaoyanmallAdmin> selectAdminListDataByExample(CskaoyanmallAdminExample example);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    CskaoyanmallAdmin selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CskaoyanmallAdmin record, @Param("example") CskaoyanmallAdminExample example);

    int updateByExample(@Param("record") CskaoyanmallAdmin record, @Param("example") CskaoyanmallAdminExample example);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CskaoyanmallAdmin record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CskaoyanmallAdmin record);

    CskaoyanmallAdmin selectCreateAdminVoById(int id);

    CskaoyanmallAdmin selectUpdateAdminById(Integer id);

    int selectHaveName(CskaoyanmallAdmin cskaoyanmallAdmin);

    int selectIdByUsername(CskaoyanmallAdmin cskaoyanmallAdmin);

    int selectIdByNameAndPass(CskaoyanmallAdmin adminBo);

    int updateIpAndTime(CskaoyanmallAdmin adminBo);


    CskaoyanmallAdmin selectByName(String name);

    CskaoyanmallAdmin selectAdminByName(String adminName);

}